.\"	$NetBSD: zdump.8,v 1.14 2014/10/23 18:45:58 christos Exp $
.Dd October 23, 2014
.Dt ZDUMP 8
.Os
.Sh NAME
.Nm zdump
.Nd time zone dumper
.Sh SYNOPSIS
.Nm zdump
.Op Fl \-version
.Op Fl v
.Op Fl V
.Op Fl c Ar [loyear,]highyear
.Op Ar zonename ...
.Nm zdump
.Fl t
.Ar [lotime,]hightime
.Op Ar zonename ...
.Sh DESCRIPTION
.Nm
prints the current time in each
.Ar zonename
named on the command line.
.Pp
These options are available:
.Bl -tag -width XXXXXXXXX -compact
.It Fl \-version
Output version information and exit.
.It Fl v
For each
.Ar zonename
on the command line,
print the time at the lowest possible time value,
the time one day after the lowest possible time value,
the times both one second before and exactly at
each detected time discontinuity,
the time at one day less than the highest possible time value,
and the time at the highest possible time value.
Each line is followed by
.Dl isdst= D
where
.Dl D
is positive, zero, or negative depending on whether
the given time is daylight saving time, standard time,
or an unknown time type, respectively.
Each line is also followed by
.Dl gmtoff= N
if the given local time is known to be
.D N
seconds east of Greenwich.
.It Fl c Ar [loyear,]highyear
Cut off verbose output at the given year(s).
Cutoff times are computed using the proleptic Gregorian calendar with year 0
and with Universal Time (UT) ignoring leap seconds.
The lower bound is exclusive and the upper is inclusive; for example, a
.Dl loyear
of 1970 excludes a transition occurring at 1970-01-01 00:00:00 UTC but a
.Dl hiyear
of 1970 includes the transition.
The default cutoff is
.Dl \*-500,2500 .
.It Fl t Ar [lotime,]hightime
Cut off verbose output at the given time(s),
given in decimal seconds since 1970-01-01 00:00:00
Coordinated Universal Time (UTC).
The
.Ar zonename
determines whether the count includes leap seconds.
As with
.Fl c ,
the cutoff's lower bound is exclusive and its upper bound is inclusive.
.It Fl V
Like
.Fl v ,
except omit the times relative to the extreme time values.
This generates output that is easier to compare to that of
implementations with different time representations.
.El
.Sh LIMITATIONS
Time discontinuities are found by sampling the results returned by localtime
at twelve-hour intervals.
This works in all real-world cases;
one can construct artificial time zones for which this fails.
.Pp
In the output, 
.Dq UT
denotes the value returned by
.Xr gmtime 3 ,
which uses UTC for modern time stamps and some other UT flavor for
time stamps that predate the introduction of UTC.
No attempt is currently made to have the output use
.Dq UTC
for newer and
.Dq UT
for older time stamps,
partly because the exact date of the introduction of UTC is problematic.
.Sh SEE ALSO
.Xr ctime 3 ,
.Xr tzfile 5 ,
.Xr zic 8
.\" @(#)zdump.8	8.2
.\" This file is in the public domain, so clarified as of
.\" 2009-05-17 by Arthur David Olson.
